@Scheduled(cron = "@weekly")
public void persisUpVotes() {
    double min = // a week ago
    double max = // now
    Set<UpVote> upVotes = redisService
        .zRangeByScore(
            UpVoteService.UPVOTE_KEY,
            min, max);
    boolean b = upVoteService
        .insertUpVotes(upVotes);
    if (b/* inserted successfully*/) {
        redisService.
            zRemoveByScore(
                UpVoteService.UPVOTE_KEY,
                min, max);
    }
}
